<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><?php echo ($title); ?></title>
<script type="text/javascript" src="../Public/js/jq.js"></script>
<style>
table{font-size:13px;}
</style>
<script>

function del(id)
{
	$.post('__URL__/delschool/',{
		'id':id
	},function(data){
		window.location.reload();
	})	
}
function sel_all()
{
		if ($('#selectall').attr('checked') == true) {
			$('.ctl').attr('checked', 'checked');
		} else {
			$('.ctl').attr('checked', '');
		}
}
function del_all()
{
	arr = null;
	$('.ctl').each(function() {
		if ($(this).attr('checked') == true) {
			if (arr == null)
				arr = $(this).val();
			else
				arr += ',' + $(this).val();
		}
	})
	if(arr !=null)
		{
		del(arr);
		}
	else
		{
		alert('没有选择内容');
		}
}
function modify(id)
{
	window.location.href="__URL__/editschool/id/"+id;	
}
</script>
</head>
<body>
<table border="1"><tr><td>&nbsp;</td><td>院校名称</td><td>所在地</td><td>学历层次</td><td>院校隶属</td><td>办学类型</td><td>院校类型</td><td>附加</td><td>操作</td></tr>
<?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): ++$i;$mod = ($i % 2 )?><tr><td><input type="checkbox" class="ctl" value="<?php echo ($vo["id"]); ?>" /></td>
<td><?php echo ($vo["title"]); ?></td><td><?php echo ($vo["address"]); ?></td><td><?php echo ($vo["education"]); ?></td><td><?php echo ($vo["belonging"]); ?></td>
<td><?php echo ($vo["schooltype"]); ?></td><td><?php echo ($vo["typeofinstitution"]); ?></td><td><?php echo ($vo["attach"]); ?></td><td><input type="button" value="改" onclick="modify('<?php echo ($vo["id"]); ?>')" /><input type="button" value="删" onclick="del('<?php echo ($vo["id"]); ?>')" /></td></tr><?php endforeach; endif; else: echo "" ;endif; ?>
</table>
全部:<input type="checkbox" onclick="sel_all()" id="selectall" /> <input type="button" onclick="del_all()" value="删除" />
<?php echo ($page); ?>
</body>
</html>